<template>
<div class='data-view'>
  <div class='data-item-area' v-for='(value,key,index) in chartData' :key='index'>
    <div v-if='typeof value[0] != "number"'>
    <h1 style='font-weight: 400;color: #666;'>题号: {{index+1}}</h1>
    <div class='title'>--{{key}}</div>
    <el-table
      :data="value"
      style="width: 100%"
      border
      sortable
    >
      <el-table-column
        v-if='value[0].type!== null'
        prop="type"
        label="选项"
        align='center'
      >
      </el-table-column>
      <el-table-column
        v-if='value[0].varchar!== null'
        prop="varchar"
        label="已填"
        align='center'
      >
      </el-table-column>
      <el-table-column
        prop="value"
        label="数量"
        align='center'
      >
      </el-table-column>
    </el-table>
  </div>
  </div>
</div>
</template>

<script>
  export default {
    name: 'RecycleData',
    props: ['chartData'],
    data() {
      return {

      }
    },
    methods: {

    }
  }
</script>

<style scoped>
.data-item-area{
    padding:15px;
    min-height: 225px;
    border: #ddd 1px dashed;
    border-top: none;
    text-align: left;
    h1{
      display: inline-block;
      float: left;
      font-weight: 400!important;
    }
}
.data-view:first-child{
  border-top: #ddd 1px dashed;
}
.el-table{
  margin-top: 15px;
}
.title{
  margin-top: 5px;
  text-indent: 1em;
  color: #666;}
</style>
